package com.ky.pro.java.nio.http.server.filter.impl;

import com.ky.pro.java.nio.http.server.filter.IGatewayOutboundFilter;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.HttpResponse;

/**
 * @ClassName EnhancedFlagHeaderFilter
 * @Description TODO
 * @Date 2021/11/20 18:44
 * @Author kevin
 **/
public class EnhancedFlagHeaderFilter implements IGatewayOutboundFilter {

    @Override
    public void filter(HttpResponse msg, ChannelHandlerContext ctx) {
        if (msg != null && msg.headers() != null) {
            msg.headers().add("enhanced", true);
        }
    }
}
